package com.zzl.bonds.ticket.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.zzl.apidoc.annotation.ApidocModel;
import com.zzl.apidoc.annotation.ApidocModelProperty;
import com.zzl.bonds.ticket.entity.BusinessContractEntity;
import com.zzl.bonds.ticket.entity.TicketDataEntity;
import com.zzl.bonds.ticket.entity.feign.ContractEntity;
import com.zzl.general.common.utils.DoubleSerialize;
import lombok.Data;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * @author ：hyt
 * @description：转单详情
 * @date ：2022/2/19 13:41
 */
@Data
@ApidocModel
@SuppressWarnings("javadoc")
public class TicketTransferInfo {
    @ApidocModelProperty(description = "主键")
    private String id;

    @ApidocModelProperty(description = "凭证编号")
    private String ticketNo;
    @ApidocModelProperty(description = "转让方方id")
    private String transferEnterpriseId;
    @ApidocModelProperty(description = "转让方企业名称")
    private String transferEnterpriseName;
    @ApidocModelProperty(description = "转让方企业社会统一代码")
    private String transferCreditCode;
    @ApidocModelProperty(description = "母单票据id")
    private String parentTicketId;
    @ApidocModelProperty(description = "母单票据编号")
    private String parentTicketNo;

    @ApidocModelProperty(description = "签收方id")
    private String receiveEnterpriseId;
    @ApidocModelProperty(description = "签收方企业名称")
    private String receiveEnterpriseName;
    @ApidocModelProperty(description = "签收方企业社会统一代码")
    private String receiveCreditCode;

    @ApidocModelProperty(description = "开单方企业名称")
    private String openEnterpriseName;
    @ApidocModelProperty(description = "开单方企业社会统一代码")
    private String openCreditCode;

    @ApidocModelProperty(description = "金融机构名称")
    private String instinctyName;

    @ApidocModelProperty(description = "转让金额")
    @JsonSerialize(using = DoubleSerialize.class)
    private Double transferAmount;
    @ApidocModelProperty(description = "开单日期", validate = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date invoiceTime;
    @ApidocModelProperty(description = "到期日期", validate = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date expireTime;
    @ApidocModelProperty(description = "剩余兑付天数")
    private String surplusCashingDays;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApidocModelProperty(description = "转单日期", validate = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    @ApidocModelProperty(description = "贸易合同编号")
    private String   contractNo;


    @ApidocModelProperty(description = "发票信息")
    List<TicketDataEntity> invoiceList = new ArrayList<>();

    @ApidocModelProperty(description = "转单资料")
    List<TicketDataEntity> proofList = new ArrayList<>();

    @ApidocModelProperty(description = "签署资料集合", example = "")
    List<BusinessContractEntity> protocolList = new ArrayList<>();

    @ApidocModelProperty(description = "备注", example = "")
    private String receiveRemark;

    @ApidocModelProperty(description = "处理状态信息悬浮")
    private String handStatusInfo;
    @ApidocModelProperty(description = "处理进度，如2/4")
    private Integer handProgress;


    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApidocModelProperty(description = "复核时间", validate = "yyyy-MM-dd HH:mm:ss")
    private Date reviewTime;


    @ApidocModelProperty(description = "复核备注", example = "")
    private String  recheckRemark;

    @JsonFormat(pattern = "yyyy-MM-dd")

    @ApidocModelProperty(description = "票据状态 1：拆转待审核 2、拆转已复核 3、拆转待签收（平台审核通过） 4、供应商已签收 5、已被拆转")
    private Integer ticketStatus;
    @ApidocModelProperty(description = "处理状态")
    private String handStatus;

    @ApidocModelProperty(description = "流程进度")
    List<ApUserShowInfo> apUserShowInfos;

    @ApidocModelProperty(description = "付息方式 ：1 融资方付息（默认）2 核心企业付息")
    private Integer paymentMode;
    @ApidocModelProperty(description = "付息方式 ：1 融资方付息（默认）2 核心企业付息")
    private String paymentModeInfo;
}
